#ifndef __JK_OBJECT_POOL_H_
#define __JK_OBJECT_POOL_H_

#include "jk_base.h"
#include "jk_array.h"

JK_LIB_NAMESPACE_BEGIN

template <typename T>
class ObjectPoolT
{
public:

public:
    ObjectPoolT()
    {

    }

    ~ObjectPoolT()
    {

    }

public:
    T& Alloc()
    {
        T* temp = NULL;
        if (free_pool_.IsEmpty())
        {
            temp = new T;
            used_pool_.Add(temp);
        }
        else
        {
        }
    }

private:
    DynamicArray<T*> free_pool_;
    DynamicArray<T*> used_pool_;
};

JK_LIB_NAMESPACE_END

#endif //!__JK_OBJECT_POOL_H_
